import axios from '@/libs/request'

// 证件类型接口
export const getCardType = () => {
  return axios.request({
    url: '/api/as/sc/dict/getDictInfoList?type=card_type',
    type: 'get'
  })
}

// 密接方式接口
export const getConnectionType = () => {
  return axios.request({
    url: '/api/as/sc/dict/getDictInfoList?type=connection_type',
    type: 'get'
  })
}

// 插入
export const insert = (data) => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/insert',
    data: data,
    type: 'post'
  })
}
// 删除
export const deleteRequest = (data) => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/delete',
    data: data,
    type: 'post'
  })
}
// 查询单条确诊人员个人信息
export const getById = (data) => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/get',
    data: data,
    type: 'get'
  })
}
// 修改单条确诊人员个人信息
export const update = (data) => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/update',
    data: data,
    type: 'post'
  })
}
// 分页查询
export const findPageList = ({ flag, pageNo, pageSize, total, type }) => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/findPageList',
    data: { flag, pageNo, pageSize, total, type },
    type: 'get'
  })
}
// 全部
export const findList = () => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/findList',
    data: {},
    type: 'get'
  })
}
// 提报
export const updateDeptCommitStatus = (data) => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/updateDeptCommitStatus',
    data: data,
    type: 'post'
  })
}
// 驳回
export const updateDeptRejectStatus = (data) => {
  return axios.request({
    url: 'api/ac/cme2/transferPersonService/updateDeptRejectStatus',
    data: data,
    type: 'post'
  })
}
export const updateDeptAuditStatus = (data) => {
  return axios.request({
    url: '/api/ac/cme2/transferPersonService/updateDeptAuditStatus',
    data: data,
    type: 'post'
  })
}
export const updateLeaderAuditStatus = (data) => {
  return axios.request({
    url: '/api/ac/cme2/transferPersonService/updateLeaderAuditStatus',
    data: data,
    type: 'post'
  })
}
